package com.ehotting.edsta.diagnosisPredict.feign;

import com.ehotting.eaf.core.web.domain.diagnosisPredict.Response;
import com.ehotting.edsta.diagnosisPredict.domain.dto.TrainingModelDataDto;
import com.ehotting.edsta.diagnosisPredict.feign.factory.TrainingFallbackFactory;
import org.apache.http.HttpResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 训练模型表feignClient
 */
@FeignClient(name = "modelManagerTraining", url = "${request.url.prefix}/training-model-data",fallbackFactory = TrainingFallbackFactory.class)
public interface TrainingFeignService {

    /**
     * 获取模型详情
     * @param projectId
     * @return
     */
    @GetMapping(value = "/find-by-projectId/{projectId}")
    Response<TrainingModelDataDto> findByProjectId(@PathVariable("projectId") Long projectId);

    /**
     * 下载
     * @param id
     * @return
     */
    @GetMapping(value = "/model-data-sdk/{id}")
    feign.Response modelDataSdk(@PathVariable("id") Long id);

    /**
     * 点击发布
     * @param taskId
     * @return
     */
    @GetMapping(value = "/find-by-training-task/{taskId}")
    Response<TrainingModelDataDto> findByTrainingTask(@PathVariable("taskId") Long taskId);

}